package com.oracletoexcle;

import com.service.TransService;
import com.service.impl.TransServiceImpl;
import com.util.StaticEunm;

/**
 * Hello world!
 *
 */
public class App {
	public static void main(String[] args) {
		TransService transService = new TransServiceImpl();
		// Mysql 数据库类型
//		String type = StaticEunm.DATABASE_MYSQL;
		// oracle 数据库类型
		String type = StaticEunm.DATABASE_ORACLE;
		// 数据库路径
		//Orcle jdbc:oracle:thin:@IP:1521:ORCL
		//Mysql jdbc:mysql://IP:3306/数据库名?useUnicode=true&characterEncoding=UTF-8
		String url = "jdbc:oracle:thin:@localhost:1521:ORCL";
		// 映射名 oracle 为用户名  MySQL为数据库名
		String owner ="EMACMS_WJK";
		// 用户名
		String username = "EMACMS_WJK";
		// 密码
		String password = "tjhq";
		// 文件名设定
		String fileName = "EMACMS_WJK";
		// 保存路径设定
		String saveUrl = "D:/EMACMS_WJK数据库文档1.xls";

		transService.downloadExcel(owner,type, url, username, password, fileName, saveUrl);
	}
}
